<!--{include header}-->
<div id="bdw" class="bdw">
<div id="bd" class="cf">
<!--{if $team['close_time']}-->
<div id="sysmsg-tip" class="sysmsg-tip-deal-close"><div class="sysmsg-tip-top"></div><div class="sysmsg-tip-content"><div class="deal-close"><div class="focus">Rất tiếc, Bạn đã trễ ...<br />Deal đã kết thúc</div><div id="tip-deal-subscribe-body" class="body"><form id="tip-deal-subscribe-form" method="post" action="/subscribe.php" class="validator"><table><tr><td>Đừng quên trở lại vào ngày mai nhé&nbsp;</td><td><input type="text" name="email" class="f-text" value="" require="true" datatype="email" /></td><td>&nbsp;<input class="commit" type="submit" value="Subscribe" /></td></tr></table></form></div></div><span id="sysmsg-tip-close" class="sysmsg-tip-close">close</span></div><div class="sysmsg-tip-bottom"></div></div>
<!--{/if}-->
<!--{if $order}-->
<div id="sysmsg-tip" ><div class="sysmsg-tip-top"></div><div class="sysmsg-tip-content">Bạn đã đặt mua sản phẩm này, nhưng chưa thanh toán .<a href="/order/check.php?id={$order['id']}">Kiểm tra ngay!</a><span id="sysmsg-tip-close" class="sysmsg-tip-close">Đóng</span></div><div class="sysmsg-tip-bottom"></div></div><div id="deal-default"> 
<!--{/if}-->
	<div id="deal-default">
		<!--{//include block_team_share}-->
		<div id="content">
			<div id="deal-intro" class="cf">
                <h1><!--{if $team['close_time']==0}--><a class="deal-today-link" href="/team.php?id={$team['id']}">{$city['name']}: </a><!--{/if}-->{$team['title']}</h1>
                <div class="main">
                    <div class="deal-buy">
                        <div class="deal-price-tag"></div>
					<!--{if ($team['state']=='soldout')}-->
                        <p class="deal-price"><strong>${formatMoney($team['team_price'],0)}{$currency}</strong></p>
					<!--{elseif $team['close_time']}-->
                        <p class="deal-price"><strong>${formatMoney($team['team_price'],0)}{$currency}</strong><span style="margin-top: 34px;"><img width="100px" alt="" src="../static/css/i/bg-deal-expired-text.png"></span></p>
					<!--{else}-->
                        <p class="deal-price"><strong>${formatMoney($team['team_price'],0)}{$currency}</strong><span><a ${$team['begin_time']<time()?' href="/voucher/buy-'.$team['id'].'.html"':''}><img src="/static/css/i/buy_btn.png" width="100px;" /></a></span></p>
					<!--{/if}-->
                    </div>
					<table class="deal-discount" border=1>
                    	<tr><td colspan=2><br></br>Giá gốc<br><b style='text-decoration: line-through; font-size: 20px;'>${formatMoney($team['market_price'],0)} {$currency}</b></td></tr>
                    	<tr><td>Giảm giá</td><td>Tiết kiệm</td></tr>
                        <tr>
							<td>${formatMoney((100*($team['market_price'] - $team['team_price'])/$team['market_price']),1)}%</td>
                            <td>${formatMoney($discount_price,0)}</td>
                        </tr>
                    </table>
					<!--{if $team['close_time']}-->
                    <div class="deal-box deal-timeleft deal-off" style="background: #e4f0f9" id="deal-timeleft" curtime="{$now}000" diff="{$diff_time}000">
						<h3>deal đóng lúc</h3>
						<div class="limitdate"><p class="deal-buy-ended">${date('d-m-Y', $team['close_time'])}<br>${date('H:i:s', $team['close_time'])}</p></div>
					</div>
					<!--{else}-->
                    <div class="deal-box deal-timeleft deal-on" id="deal-timeleft" curtime="{$now}000" diff="{$diff_time}000">
						<h3>Thời gian còn lại</h3>
						<div class="limitdate">
							<ul id="counter">
						<!--{if $left_day>0}-->
							<li><span>{$left_day}</span>Ngày</li><li><span>{$left_hour}</span>giờ</li><li><span>{$left_minute}</span>phút</li>
						<!--{else}-->
							<li><span>{$left_hour}</span>Giờ</li><li><span>{$left_minute}</span>phút</li><li><span>{$left_time}</span>giây</li>
						<!--{/if}-->
							</ul>
						</div>
					</div>
					<!--{/if}-->
				<!--{if $team['close_time']==0}-->
					<!--{if $team['state']=='none'}-->
					<div class="deal-box deal-status" id="deal-status">
						<p class="deal-buy-tip-top"><strong>{$team['now_number']}</strong> Đã mua</p>
						<div class="progress-pointer" style="padding-left:{$bar_size-$bar_offset}px;"><span></span></div>
						<div class="progress-bar"><div class="progress-left" style="width:{$bar_size-$bar_offset}px;"></div><div class="progress-right "></div></div>
						<div class="cf"><div class="min">0</div><div class="max">{$team['min_number']}</div></div>
						<p class="deal-buy-tip-btm">Cần <strong>{$team['min_number']-$team['now_number']}</strong> phiếu để đạt mức tối thiểu! </p>
					</div>
					<!--{else}-->
					<div class="deal-box deal-status deal-status-open" id="deal-status">
						<p class="deal-buy-tip-top"><strong>{$team['now_number']}</strong> Phiếu đã được mua</p>
					<!--{if $team['max_number']&&$team['max_number']>$team['now_number']}-->
						<p class="deal-buy-tip-btm">Còn <strong>{$team['max_number']-$team['now_number']}</strong> phiếu nữa</p>
					<!--{/if}-->
						<p class="deal-buy-on" style="line-height:200%;"><img src="/static/css/i/deal-buy-succ.gif"/> vẫn còn mua được <!--{if $team['max_number']>$team['now_number']||$team['max_number']==0}--><!--{/if}--></p>
						<!-- 
					{if $team['reach_time']}-->
						<p class="deal-buy-tip-btm">Minimum Buys to meet to Tip this Deal <strong>{$team['min_number']}</strong> persons</p>
					<!--{/if}-->
					 -->
					</div>
					<!--{/if}-->
				<!--{else}-->
					<div class="deal-box deal-status deal-status-{$team['state']}" style="background: #e4f0f9;" id="deal-status"><div class="deal-buy-{$team['state']}"></div><p class="deal-buy-tip-total">tổng cộng <strong>{$team['now_number']}</strong> phiếu đã được mua</p></div> 
				<!--{/if}-->
				</div>
                <div class="side">
                    <div class="deal-buy-cover-img" id="team_images">
					<!--{if $team['image1']||$team['image2']}-->
						<div class="mid">
							<ul>
								<li class="first"><img src="${team_image($team['image'])}"/></li>
							<!--{if $team['image1']}-->
								<li><img src="${team_image($team['image1'])}"/></li>
							<!--{/if}-->
							<!--{if $team['image2']}-->
								<li><img src="${team_image($team['image2'])}"/></li>
							<!--{/if}-->
							<!--{if $team['image3']}-->
								<li><img src="${team_image($team['image3'])}"/></li>
							<!--{/if}-->
							<!--{if $team['image3']}-->
								<li><img src="${team_image($team['image4'])}"/></li>
							<!--{/if}-->
							</ul>
							<div id="img_list">
								<a ref="1" class="active">1</a>
							<!--${$imageindex=1;}-->
							<!--{if $team['image1']}-->
								<a ref="${++$imageindex}" >{$imageindex}</a>
							<!--{/if}-->
							<!--{if $team['image2']}-->
								<a ref="${++$imageindex}" >{$imageindex}</a>
							<!--{/if}-->
							<!--{if $team['image3']}-->
								<a ref="${++$imageindex}" >{$imageindex}</a>
							<!--{/if}-->
							<!--{if $team['image4']}-->
								<a ref="${++$imageindex}" >{$imageindex}</a>
							<!--{/if}-->														
							</div> 
						</div>
						<!--{else}-->
							<img src="${team_image($team['image'])}" width="440" height="280" />
						<!--{/if}-->
					</div>
				<!--{if strip_tags($team['summary'])!=$team['summary']}-->{$team['summary']}<!--{else}--><div style="line-height: 22px;text-align: justify;" class="digest"><br />${nl2br(strip_tags($team['summary']))}</div><!--{/if}-->
                </div>
            </div>
            <div id="deal-stuff" class="cf">
                <div class="clear box ${($partner&&!option_yes('teamwhole'))?'box-split':''}">
                    <div class="box-top"></div>
                    <div class="box-content cf">
                        <div class="main" id="team_main_side">
						<!--{if trim(strip_tags($team['detail']))}-->
                            <h2 id="detail">Chi tiết</h2>
							<div style="line-height: 22px" class="blk detail">{$team['detail']}</div>
						<!--{/if}-->
						<!--{if trim(strip_tags($team['notice']))}-->
							<h2 id="detailit">Tips</h2>
							<div style="line-height: 22px" class="blk cf">{$team['notice']}</div>
						<!--{/if}-->
						<!--{if trim(strip_tags($team['userreview']))}-->
							<h2 id="userreview">Reviews</h2>
							<div style="line-height: 22px" class="blk review">${userreview($team['userreview'])}</div>
						<!--{/if}-->
						<!--{if trim(strip_tags($team['systemreview']))}-->
							<h2 id="systemreview">{$INI['system']['abbreviation']} Says</h2>
							<div class="blk review">{$team['systemreview']}</div>
						<!--{/if}-->
						</div>

                        <div class="side" id="team_partner_side_${(!option_yes('teamwhole')&&abs(intval($partner['id'])))?1:0}">
                            <div id="side-Business">
                            	<!--{if !empty($partner['image'])}-->
                            	<img title="{$partner['title']}" alt="nhà cung cấp, đối tác" src="static/{$partner['image']}">
                            	<!--{/if}-->
								<h2 style="font-size: 13px;">{$partner['title']}</h2>
								<div>${ZPartner::nl2br2($partner['location'])}</div>
								<!--{if !empty($partner['other'])}-->
								<div style="line-height: 20px;">${ZPartner::nl2br2($partner['other'])}</div>
								<!--{/if}-->
								<div><a href="{$partner['homepage']}" target="_blank">${domainit($partner['homepage'])}</a></div>
								<!--{include block_block_partnermap}-->
							</div>
						</div>
                        <div class="clear"></div>
                    </div>
                    <div class="box-bottom"></div>
                    <!--flow me at ...-->
                    <div class="box-top"></div>
                    <div class="box-content">
                    <!--{if !empty($INI['system']['twitter'])}-->
                    	<a target="_blank" href="http://twitter.com/#!/{$INI['system']['twitter']}"><img width="90px" alt="flow me at twitter" src="../static/img/twitter.png"></a>
                    <!--{/if}-->
                    <!--{if !empty($INI['system']['facebook'])}-->
                    	<a target="_blank" href="{$INI['system']['facebook']}"><img width="60px" alt="flow me at facebook" src="../static/img/facebook.png"></a>
                    <!--{/if}-->
                    	<a href="#"><img width="60px" alt="flow me at twitter" src="../static/img/rss.png"></a>
                    </div>
                    <div class="box-bottom"></div>
                    <!-- end -->
                </div>
            </div>
    </div>
    <div id="sidebar">
		<!--{//include block_side_invite}-->
		<!--{//include block_side_bulletin}-->
		<!--{include block_side_flv}-->
		<!--{include block_side_others_seconds}-->
		<!--{include block_side_ask}-->
		<!--{include block_side_send2group}-->
		<!--{include block_side_others}-->
		<!--{include block_side_business}-->
		<!--{include block_side_tranfer}-->
		<!--{//include block_side_subscribe}-->
		<!--{include block_side_twitter}-->
	</div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include footer}-->
